package com.demo.enums;

public enum RoleEnum {
    NURSE_IN_CHARGE(1, "主管护士"),
    HEAD_NURSE(2, "护士长"),
    DOCTOR_IN_CHARGE(3, "主管医生"),
    MEDICAL_LEADER(4, "医疗组长");

    private int value;
    private String desc;

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    RoleEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static RoleEnum getByValue(Integer value) {
        for (RoleEnum item : values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return null;
    }
}
